From: Matthias Clasen Date: Wed, 4 Mar 2015 11:03:10 +0000 (-0500) Subject: Fix offset calculation for g_dpgettext X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1574 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3ec764d5844efd0fc71ca132efdc3513afc66b56;p=gnome-shell.git Fix offset calculation for g_dpgettext We need to pass a positive number here. https://bugzilla.gnome.org/show_bug.cgi?id=745521 --- diff --git a/src/shell-util.c b/src/shell-util.c index f922f6eb5..d6815b957 100644 --- a/src/shell-util.c +++ b/src/shell-util.c @@ -229,7 +229,7 @@ shell_util_translate_time_string (const char *str) setlocale (LC_MESSAGES, locale); sep = strchr (str, '\004'); - res = g_dpgettext (NULL, str, sep ? str - sep : 0); + res = g_dpgettext (NULL, str, sep ? sep - str : 0); setlocale (LC_MESSAGES, "");